#include "VideoLivePage.h"
#include "ui_VideoLivePage.h"
#include <QResizeEvent>
VideoLivePage::VideoLivePage(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::VideoLivePage)
{
    ui->setupUi(this);
    UpdateBGI(this->geometry().width(),this->geometry().height());
}

VideoLivePage::~VideoLivePage()
{
    delete ui;
}


void VideoLivePage::resizeEvent(QResizeEvent *event)
{
    UpdateBGI(event->size().width(),event->size().height());
}

void VideoLivePage::UpdateBGI(int width,int height)
{
    int targetWidth = width;
    int targetHeight = height;
    ui->frame_capture->setGeometry(0,0,targetWidth,targetHeight);
}
